<%
  js_env :ANALYTICS => {
    'course' => @course_json,
    'student_id' => @student.id,
    'startDate' => @start_date,
    'endDate' => @end_date
  }
  js_env[:context_asset_string] ||= @course&.asset_string

  @body_classes << 'full-width'
  add_crumb @course.short_name, url_for(@course)
  add_crumb t(:analytics, "Analytics"), @course_json[:analytics_url]
  add_crumb @student.short_name, analytics_student_in_course_path(:course_id => @course.id, :student_id => @student.id), :id => "student_analytics_crumb"
%>

<%
  js_env ga_page_title: "Analytics: #{@course.short_name} -- Student"
%>
<% content_for :page_title do %>
  <%= t :page_title, "Analytics: %{course} -- %{student}", :course => @course.short_name, :student => context_user_name(@course, @student) %>
<% end %>

<h1 class='screenreader-only'>
  <%= t :page_title, "Analytics: %{course} -- %{student}", :course => @course.short_name, :student => context_user_name(@course, @student) %>
</h1>

<div id="analytics_body"></div>

<% css_bundle :analytics, :plugin => :analytics %>
<% js_bundle :student_in_course, :plugin => :analytics %>
